<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7">
<title>KUGOU JS DOC</title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="../js/min/base-min.js"></script>
<script type="text/javascript">
/*Kg.Cookie.write("kugou", "hello,kugou", 365);
alert(Kg.Cookie.read("kugou"));
alert(document.cookie)*/
$(function(){
	var $h2 = $("#left h2");
	var $cores = $("#left ul:eq(0) li");
	var $plugs = $("#left ul:eq(1) li");
	$.each($h2, function(i, o){
		$(o).click(function(){
			$("#left ul").eq(i).slideToggle();	
		})	
	})
	
	$.each($cores, function(i, o){
		$(o).click(function(){
			$("#right h1").hide();
			$cores.removeClass("hover");	
			$plugs.removeClass("hover");	
			$(".plugs").hide();
			$(".cores").hide()
			
			this.className = "hover";	
			$(".cores").eq(i).show();
		})
	})
	
	$.each($plugs, function(i, o){
		$(o).click(function(){
			$("#right h1").hide();
			$cores.removeClass("hover");	
			$plugs.removeClass("hover");	
			$(".cores").hide();
			$(".plugs").hide();
			
			this.className = "hover";	
			$(".plugs").eq(i).show();
			$(".plugs:eq(" + i +") iframe").attr("src", $(".plugs:eq(" + i +") iframe").attr("_src"));
		})
	})
})
</script>
</head>

<body>
<div id="left"><a href="http://www.kugou.com" target="_blank" class="logo">KUGOU</a>
  <h2>Kg</h2>
  <ul>
    <li><a href="javascript:;">UA</a></li>
    <li><a href="javascript:;">$</a></li>
    <li><a href="javascript:;">$T</a></li>
    <li><a href="javascript:;">$C</a></li>
    <li><a href="javascript:;">$A</a></li>
    <li><a href="javascript:;">extend</a></li>
	<li><a href="javascript:;">getStyle</a></li>
    <li><a href="javascript:;">getBodySize</a></li>
    <li><a href="javascript:;">getXY</a></li>
    <!--li><a href="javascript:;">isFather</a></li-->
    <li><a href="javascript:;">addEvent</a></li>
    <li><a href="javascript:;">removeEvent</a></li>
    <li><a href="javascript:;">bind</a></li>
	<li><a href="javascript:;">stopEvent</a></li>
    <li><a href="javascript:;">inArray</a></li>
    <li><a href="javascript:;">indexOf</a></li>
    <li><a href="javascript:;">setOpacity</a></li>
    <li><a href="javascript:;">fadein</a></li>
    <li><a href="javascript:;">fadeout</a></li>
	<li><a href="javascript:;">slide</a></li>
    <li><a href="javascript:;">JSON</a></li>
    <li><a href="javascript:;">Cookie</a></li>
    <li><a href="javascript:;">Param</a></li>
    <li><a href="javascript:;">Ajax</a></li>
	<li><a href="javascript:;">get</a></li>
	<li><a href="javascript:;">post</a></li>
	<li><a href="javascript:;">getJSON</a></li>
	<li><a href="javascript:;">postJSON</a></li>
	<li><a href="javascript:;">loadScript</a></li>
  </ul>
  <h2>Plug-In</h2>
  <ul>
    <li><a href="javascript:;">Focus</a></li>
    <li><a href="javascript:;">Grade</a></li>
    <li><a href="javascript:;">Scroll</a></li>
    <li><a href="javascript:;">Tab</a></li>
    <li><a href="javascript:;">Tips</a></li>
	<li><a href="javascript:;">fakeSelect</a></li>
	<li><a href="javascript:;">Slide</a></li>
	<li><a href="javascript:;">LightBox</a></li>
  </ul>
</div>
<div id="right">
  <h1>Kugou JS API</h1>
  <div class="cores">
    <h2>UA</h2>
    Kg.UA 浏览器相关对象
    <div class="property"><span>Ie</span><span>Ie6</span><span>Ie7</span><span>Ie8</span><span>FF</span><span>Opera</span><span>Chrom</span></div>
    <h3>Ie</h3>
    <p class="pro_detial">检查当前浏览器是否为IE <span class="blue">Boolean</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">UA</span>.<span class="red">Ie</span>;</pre>
    </div>
    
    <h3>Ie6</h3>
    <p class="pro_detial">检查当前浏览器是否为Ie6 <span class="blue">Boolean</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">UA</span>.<span class="red">Ie6</span>;</pre>
    </div>
    
    <h3>Ie7</h3>
    <p class="pro_detial">检查当前浏览器是否为Ie7 <span class="blue">Boolean</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">UA</span>.<span class="red">Ie7</span>;</pre>
    </div>
    
    <h3>Ie8</h3>
    <p class="pro_detial">检查当前浏览器是否为Ie8 <span class="blue">Boolean</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">UA</span>.<span class="red">Ie8</span>;</pre>
    </div>
    
    <h3>FF</h3>
    <p class="pro_detial">检查当前浏览器是否为火狐 <span class="blue">Boolean</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">UA</span>.<span class="red">FF</span>;</pre>
    </div>
    
    <h3>Opera</h3>
    <p class="pro_detial">检查当前浏览器是否为Opera <span class="blue">Boolean</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">UA</span>.<span class="red">Opera</span>;</pre>
    </div>
    
    <h3>Chrom</h3>
    <p class="pro_detial">检查当前浏览器是否为谷歌浏览器 <span class="blue">Boolean</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">UA</span>.<span class="red">Chrom</span>;</pre>
    </div>
  </div>
  
  <div class="cores">
  	<h2>$</h2>
    通过id获取Dom对象
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>param1</strong> (String | Object)</td>
            <td>元素的ID名或者DOM对象</td>
        </tr>
        <tr>
        	<td>……</td>
            <td>……</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial">获取页面元素 <span class="blue">DOM Object</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">$</span>("id1");    //获取名为id1的DOM对象
<span class="red">Kg</span>.<span class="red">$</span>("id1", "id2", "id3");    //获取名为id1、id2、id3的DOM对象</pre>
    </div>
  </div>
  
  <div class="cores">
  	<h2>$T</h2>
    通过标签名字获取Dom对象
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>tagName</strong> (String)</td>
            <td>标签名称</td>
        </tr>
        <tr>
        	<td><strong>el</strong> (String | Object)</td>
            <td>上下文对象</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial">获取页面元素 <span class="blue">DOM Object</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">$T</span>("div");    //获取标签名为DIV的DOM对象
<span class="red">Kg</span>.<span class="red">$T</span>("div", "id1");    //在名为id1的DOM对象上下文下获取名为DIV的DOM对象</pre>
    </div>
  </div>
  
  <div class="cores">
  	<h2>$C</h2>
    通过类名获取Dom对象
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>name</strong> (String)</td>
            <td>类名</td>
        </tr>
        <tr>
        	<td><strong>el</strong> (String | Object)</td>
            <td>上下文对象</td>
        </tr>
        <tr>
        	<td width="250"><strong>tagName</strong> (String)</td>
            <td>标签名称</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial">获取页面元素 <span class="blue">DOM Object</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">$C</span>("class1");    //获取类名为class1的DOM对象
<span class="red">Kg</span>.<span class="red">$C</span>("class1", "id1");    //在名为id1的DOM对象上下文下获取类名为class1的DOM对象
<span class="red">Kg</span>.<span class="red">$C</span>("class1", "id1", "div");    //在名为id1的DOM对象上下文下获取类名为class1的DOM对象,并且该标签名为DIV</pre>
    </div>
  </div>


  <div class="cores">
  	<h2>$A</h2>
    将DomCollections转化为Array
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>args</strong> (Object)</td>
            <td>DomCollections</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 将div DomCollections转化为Array <span class="blue">Array</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">$A</span>(kg.$T("div"));    //将获取回来的DIV Domcollections转为Array
</pre>
    </div>
  </div>
  
  <div class="cores">
  	<h2>extend</h2>
    继承对象（复制属性/方法）
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>target</strong> (Object)</td>
            <td>被复制对象（子对象）</td>
        </tr>
        <tr>
        	<td width="250"><strong>souce</strong> (Object)</td>
            <td>复制对象（父对象）</td>
        </tr>
        <tr>
        	<td width="250"><strong>rewrite</strong> (Boolean)</td>
            <td>是否重写属性/方法</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> obj1继承obj2对象 <span class="blue">Object</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">extend</span>(obj1, obj2, true);    //obj1继承obj2的所有方法/属性
</pre>
    </div>
  </div>


  <div class="cores">
  	<h2>getStyle</h2>
    获取对象样式
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>el</strong> (String | Object)</td>
            <td>HTML标签的id或者Dom对象</td>
        </tr>
        <tr>
        	<td width="250"><strong>name</strong> (String)</td>
            <td>样式名字</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 获取dom的font-size值 <span class="blue">String</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">getStyle</span>(dom, "font-size");  
</pre>
    </div>
  </div>

  <div class="cores">
  	<h2>getBodySize</h2>
    获取页面可视宽、高、滚动全高、滚动全宽、滚动高、滚动宽
    <h3>Example</h3>
    <p class="pro_detial"> 获取页面可视宽、高、滚动全高、滚动全宽、滚动高、滚动宽 <span class="blue">Object</span></p>
    <div class="code">
      <pre>var o = <span class="red">Kg</span>.<span class="red">getBodySize</span>();
document.write(o.cH);  //获取页面可视高度
document.write(o.cW);  //获取页面可视宽度
document.write(o.sH);  //获取页面高度
document.write(o.sW);  //获取页面宽度
document.write(o.sT);  //获取页面scrollTop
document.write(o.sL);  //获取页面scrollLeft
</pre>
    </div>
  </div>
  
  <div class="cores">
  	<h2>getXY</h2>
    获取DOM对象与窗口边界的距离
    <h3>Example</h3>
    <p class="pro_detial"> 获取DOM对象与窗口边界的距离 <span class="blue">Object</span></p>
    <div class="code">
      <pre>var o = <span class="red">Kg</span>.<span class="red">getXY</span>(dom);
document.write(o.left);  //获取dom与窗口边际的水平距离
document.write(o.right);  //获取dom与窗口边际的水平距离+自身宽度
document.write(o.top);  //获取dom与窗口边际的垂直距离
document.write(o.bottom);  //获取dom与窗口边际的垂直距离+自身高度
</pre>
    </div>
  </div>
  
  <!--div class="cores">
  	<h2>isFather</h2>
    判断是否子孙后代关系
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>father</strong> (String|Object)</td>
            <td>父层DOM对象或者ID</td>
        </tr>
        <tr>
        	<td width="250"><strong>child</strong> (String|Object)</td>
            <td>子层DOM对象或者ID</td>
        </tr>
        <tr>
        	<td width="250"><strong>bol</strong> (Boolean)</td>
            <td>是否允许2个DOM对象为同一个对象</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 判断dom1和dom2是否后代关系 <span class="blue">Boolean</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">isFather</span>(dom1, dom2, false);</pre>
    </div>
  </div-->
  
  <div class="cores">
  	<h2>addEvent</h2>
    设置监听事件
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>obj</strong> (String | Object)</td>
            <td>监听对象,HTML标签的id或者Dom对象</td>
        </tr>
        <tr>
        	<td width="250"><strong>type</strong> (String)</td>
            <td>监听类型</td>
        </tr>
        <tr>
        	<td width="250"><strong>func</strong> (Function)</td>
            <td>监听方法</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 给dom1绑定onclick事件</p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">addEvent</span>(dom1, "click", function(){
      alert(1);
});</pre>
    </div>
  </div>
  
  <div class="cores">
  	<h2>removeEvent</h2>
    取消监听事件
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>obj</strong> (String | Object)</td>
            <td>监听对象,HTML标签的id或者Dom对象</td>
        </tr>
        <tr>
        	<td width="250"><strong>type</strong> (String)</td>
            <td>监听类型</td>
        </tr>
        <tr>
        	<td width="250"><strong>func</strong> (Function)</td>
            <td>监听方法</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 给dom1取消onclick事件</p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">removeEvent</span>(dom1, "click", func);</pre>
    </div>
  </div>
  
  <div class="cores">
  	<h2>bind</h2>
    选择环境运行函数
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>func</strong> (Function)</td>
            <td>待执行函数</td>
        </tr>
        <tr>
        	<td width="250"><strong>environment</strong> (Object)</td>
            <td>运行环境</td>
        </tr>
        <tr>
        	<td width="250"><strong>……</strong></td>
            <td>待执行函数所需参数</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 在dom1下运行函数 <span class="blue">Function</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">bind</span>(func, dom1);</pre>
    </div>
  </div>

  <div class="cores">
  	<h2>stopEvent</h2>
    停止事件冒泡
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>event</strong> (Event Object)</td>
            <td>当前触发的事件对象</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 停止点击事件网上冒泡 <span class="blue">Object</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">stopEvent</span>(event);</pre>
    </div>
  </div>
  
  <div class="cores">
  	<h2>inArray</h2>
    判断检测元素是否在数组内
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>arr</strong> (Array)</td>
            <td>检测所在的数组</td>
        </tr>
        <tr>
        	<td width="250"><strong>compare</strong> (All)</td>
            <td>检测元素 注意：不要比较内容相同但内存地址不同的元素</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 判断string1是否在数组arr内 <span class="blue">Boolean</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">inArray</span>(arr, string1);</pre>
    </div>
  </div>
  
  <div class="cores">
  	<h2>indexOf</h2>
    判断检测元素在数组内的位置
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>arr</strong> (Array)</td>
            <td>检测所在的数组</td>
        </tr>
        <tr>
        	<td width="250"><strong>compare</strong> (All)</td>
            <td>检测元素 注意：不要比较内容相同但内存地址不同的元素</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 判断string1在数组arr内的位置 <span class="blue">Number（不存在则返回-1）</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">indexOf</span>(arr, string1);</pre>
    </div>
  </div>
  
  <div class="cores">
  	<h2>setOpacity</h2>
    设置Dom对象的透明度
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>el</strong> (String | Object)</td>
            <td>HTML标签的id或者Dom对象</td>
        </tr>
        <tr>
        	<td width="250"><strong>num</strong> (Nunber)</td>
            <td>透明值</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 设置dom1未透明 <span class="blue">Dom Object</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">setOpacity</span>(dom1, 0);</pre>
    </div>
  </div>
  
  <div class="cores">
  	<h2>fadein</h2>
    Dom对象透明渐出
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>el</strong> (String | Object)</td>
            <td>HTML标签的id或者Dom对象</td>
        </tr>
        <tr>
        	<td width="250"><strong>speed</strong> (Nunber)</td>
            <td>延时值(可选)</td>
        </tr>
        <tr>
        	<td width="250"><strong>step</strong> (Nunber)</td>
            <td>透明步长(可选)</td>
        </tr>
        <tr>
        	<td width="250"><strong>callback</strong> (Function)</td>
            <td>回调函数(可选)</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 设置dom1透明渐出 <span class="blue">Timer</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">fadein</span>(dom1);</pre>
    </div>
  </div>
  
  <div class="cores">
  	<h2>fadeout</h2>
    Dom对象透明渐隐
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>el</strong> (String | Object)</td>
            <td>HTML标签的id或者Dom对象</td>
        </tr>
        <tr>
        	<td width="250"><strong>speed</strong> (Nunber)</td>
            <td>延时值(可选)</td>
        </tr>
        <tr>
        	<td width="250"><strong>step</strong> (Nunber)</td>
            <td>透明步长(可选)</td>
        </tr>
        <tr>
        	<td width="250"><strong>callback</strong> (Function)</td>
            <td>回调函数(可选)</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 设置dom1透明渐隐 <span class="blue">Timer</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">fadeout</span>(dom1);</pre>
    </div>
  </div>

  <div class="cores">
  	<h2>slide</h2>
    对象滑动
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>el</strong> (String | Object)</td>
            <td>HTML标签的id或者Dom对象</td>
        </tr>
        <tr>
        	<td width="250"><strong>style</strong> (String)</td>
            <td>滑动样式</td>
        </tr>
        <tr>
        	<td width="250"><strong>start</strong> (Nunber)</td>
            <td>开始位置</td>
        </tr>
		<tr>
        	<td width="250"><strong>end</strong> (Nunber)</td>
            <td>结束位置</td>
        </tr>
		<tr>
        	<td width="250"><strong>speed</strong> (Nunber)</td>
            <td>滑动速度（可选）</td>
        </tr>
        <tr>
        	<td width="250"><strong>callback</strong> (Function)</td>
            <td>回调函数(可选)</td>
        </tr>
		<tr>
        	<td width="250"><strong>extra</strong> (Function)</td>
            <td>每下样式改变成执行的函数(可选)</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 滑动增加宽度 <span class="blue">Timer</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">slide</span>(dom1, "width", 0, 300);</pre>
    </div>
  </div>
  
  <div class="cores">
    <h2>JSON</h2>
    Kg.JSON JSON对象
    <div class="property"><span>stringify</span><span>parse</span></div>
    <h3>stringify</h3>
    <p class="pro_detial">将字面量对象转为string <span class="blue">String</span></p>
    <div class="code">
      <pre>var o = {"a":"0"};
<span class="red">Kg</span>.<span class="red">JSON</span>.<span class="red">stringify</span>(o);  //返回字符串{"a":"0"}</pre>
    </div>
    
    <h3>parse</h3>
    <p class="pro_detial">将string转为字面量对象 <span class="blue">Object</span></p>
    <div class="code">
      <pre>var str = '{"a":"0"}';
<span class="red">Kg</span>.<span class="red">JSON</span>.<span class="red">parse</span>(str);  //返回字面量对象{"a":"0"}</pre>
    </div>
  </div>


  <div class="cores">
    <h2>Cookie</h2>
    Kg.Cookie Cookie对象
    <div class="property"><span>setDay</span><span>setHour</span><span>setMin</span><span>setSec</span><span>read</span><span>remove</span></div>
    <h3>setDay</h3>
    <p class="pro_detial">将kugou写入cookie，cookie存储时长为365日</p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">Cookie</span>.<span class="red">setDay</span>("kugou", "hello,kugou", 365);</pre>
    </div>

	<h3>setHour</h3>
    <p class="pro_detial">将kugou写入cookie，cookie存储时长为3小时</p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">Cookie</span>.<span class="red">setHour</span>("kugou", "hello,kugou", 3);</pre>
    </div>

	<h3>setMin</h3>
    <p class="pro_detial">将kugou写入cookie，cookie存储时长为5分钟</p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">Cookie</span>.<span class="red">setMin</span>("kugou", "hello,kugou", 5);</pre>
    </div>

	<h3>setSec</h3>
    <p class="pro_detial">将kugou写入cookie，cookie存储时长为10秒</p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">Cookie</span>.<span class="red">setSec</span>("kugou", "hello,kugou", 10);</pre>
    </div>
    
    <h3>read</h3>
    <p class="pro_detial">获取名未kugou的cookie <span class="blue">String</span></p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">Cookie</span>.<span class="red">read</span>("kugou");</pre>
	  <pre><span class="red">Kg</span>.<span class="red">Cookie</span>.<span class="red">read</span>("kugou", "name");</pre>
    </div>
    
    <h3>remove</h3>
    <p class="pro_detial">删除名为kugou的cookie</p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">Cookie</span>.<span class="red">remove</span>("kugou");</pre>
    </div>
  </div>

  <div class="cores">
    <h2>Param</h2>
    Kg.Param Param对象
    <div class="property"><span>parse</span><span>toString</span><span>add</span></div>
    <h3>parse</h3>
    <p class="pro_detial">将参数转为字面量对象 <span class="blue">Object</span></p>
    <div class="code">
      <pre>var str = "kugou=1&age=18";
var o = <span class="red">new Kg</span>.<span class="red">Param()</span>.<span class="red">parse</span>(str);
document.write(o.kugou);  //1
</pre>
    </div>
    
    <h3>toString</h3>
    <p class="pro_detial">转化成HTTP参数格式 <span class="blue">String</span></p>
    <div class="code">
      <pre><span class="red">new Kg</span>.<span class="red">Param()</span>.<span class="red">toString()</span>;  //xxx=xx&xxx=xx </pre>
    </div>
    
    <h3>add</h3>
    <p class="pro_detial">添加参数 <span class="blue">Object</span></p>
    <div class="code">
      <pre><span class="red">new Kg</span>.<span class="red">Param()</span>.<span class="red">add("kugou",1)</span>.<span class="red">add("age",18)</span>; </pre>
    </div>
  </div>

  <div class="cores">
  	<h2>Ajax</h2>
    异步请求
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>method</strong> (String)</td>
            <td>请求方法</td>
        </tr>
        <tr>
        	<td width="250"><strong>url</strong> (String)</td>
            <td>请求地址</td>
        </tr>
        <tr>
        	<td width="250"><strong>async</strong> (Boolean)</td>
            <td>是否异步请求(可选)</td>
        </tr>
        <tr>
        	<td width="250"><strong>args</strong> (String | Object)</td>
            <td>请求参数(可选)</td>
        </tr>
        <tr>
        	<td width="250"><strong>callback</strong> (Function)</td>
            <td>回调函数(可选)</td>
        </tr>
		<tr>
        	<td width="250"><strong>error</strong> (Function)</td>
            <td>请求页面出错时的回调函数(可选)</td>
        </tr>
        <tr>
        	<td width="250"><strong>docType</strong> (String)</td>
            <td>返回文档格式(可选)</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 异步请求页面</p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">Ajax</span>("post", "ajax_back.json", true, "a=10&b=20", func, func1, "json");

<span class="red">Kg</span>.<span class="red">Ajax</span>("post", "ajax_back.json", true, {a:10, b:20}, func, func1, "xml");
</pre>
    </div>
  </div>

  <div class="cores">
  	<h2>get</h2>
    get异步请求
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
        <tr>
        	<td width="250"><strong>url</strong> (String)</td>
            <td>请求地址</td>
        </tr>
        <tr>
        	<td width="250"><strong>params</strong> (String | Object)</td>
            <td>请求参数(可选)</td>
        </tr>
        <tr>
        	<td width="250"><strong>callback</strong> (Function)</td>
            <td>回调函数(可选)</td>
        </tr>
		<tr>
        	<td width="250"><strong>error</strong> (Function)</td>
            <td>请求页面出错时的回调函数(可选)</td>
        </tr>
        <tr>
        	<td width="250"><strong>async</strong> (Boolean)</td>
            <td>是否异步请求(可选)</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 异步请求页面</p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">get</span>("test.apsx", {"name":"kugou"}, func);

<span class="red">Kg</span>.<span class="red">get</span>("test.apsx", "name=kugou&id=123", func);
</pre>
    </div>
  </div>

  <div class="cores">
  	<h2>post</h2>
    post异步请求
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
        <tr>
        	<td width="250"><strong>url</strong> (String)</td>
            <td>请求地址</td>
        </tr>
        <tr>
        	<td width="250"><strong>params</strong> (String | Object)</td>
            <td>请求参数(可选)</td>
        </tr>
        <tr>
        	<td width="250"><strong>callback</strong> (Function)</td>
            <td>回调函数(可选)</td>
        </tr>
		<tr>
        	<td width="250"><strong>error</strong> (Function)</td>
            <td>请求页面出错时的回调函数(可选)</td>
        </tr>
        <tr>
        	<td width="250"><strong>async</strong> (Boolean)</td>
            <td>是否异步请求(可选)</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 异步请求页面</p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">post</span>("test.apsx", {"name":"kugou"}, func);

<span class="red">Kg</span>.<span class="red">post</span>("test.apsx", "name=kugou&id=123", func);
</pre>
    </div>
  </div>

  <div class="cores">
  	<h2>getJSON</h2>
    通过get异步获取JSON
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
        <tr>
        	<td width="250"><strong>url</strong> (String)</td>
            <td>请求地址</td>
        </tr>
        <tr>
        	<td width="250"><strong>params</strong> (String | Object)</td>
            <td>请求参数(可选)</td>
        </tr>
        <tr>
        	<td width="250"><strong>callback</strong> (Function)</td>
            <td>回调函数(可选)</td>
        </tr>
		<tr>
        	<td width="250"><strong>error</strong> (Function)</td>
            <td>请求页面出错时的回调函数(可选)</td>
        </tr>
        <tr>
        	<td width="250"><strong>async</strong> (Boolean)</td>
            <td>是否异步请求(可选)</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 异步请求页面</p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">getJSON</span>("test.json", {"name":"kugou"}, func);

<span class="red">Kg</span>.<span class="red">getJSON</span>("test.json", "name=kugou&id=123", func);
</pre>
    </div>
  </div>

  <div class="cores">
  	<h2>postJSON</h2>
    通过post异步获取JSON
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
        <tr>
        	<td width="250"><strong>url</strong> (String)</td>
            <td>请求地址</td>
        </tr>
        <tr>
        	<td width="250"><strong>params</strong> (String | Object)</td>
            <td>请求参数(可选)</td>
        </tr>
        <tr>
        	<td width="250"><strong>callback</strong> (Function)</td>
            <td>回调函数(可选)</td>
        </tr>
		<tr>
        	<td width="250"><strong>error</strong> (Function)</td>
            <td>请求页面出错时的回调函数(可选)</td>
        </tr>
        <tr>
        	<td width="250"><strong>async</strong> (Boolean)</td>
            <td>是否异步请求(可选)</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 异步请求页面</p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">postJSON</span>("test.json", {"name":"kugou"}, func);

<span class="red">Kg</span>.<span class="red">postJSON</span>("test.json", "name=kugou&id=123", func);
</pre>
    </div>
  </div>

  <div class="cores">
  	<h2>loadScript</h2>
    动态加载脚本，可解决跨域问题
    <table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
        <tr>
        	<td width="250"><strong>url</strong> (String)</td>
            <td>请求地址</td>
        </tr>
        <tr>
        	<td width="250"><strong>args</strong> (String | Object)</td>
            <td>请求参数(可选)</td>
        </tr>
        <tr>
        	<td width="250"><strong>callback</strong> (Function)</td>
            <td>回调函数(可选)</td>
        </tr>
    </table>
    <h3>Example</h3>
    <p class="pro_detial"> 异步请求页面</p>
    <div class="code">
      <pre><span class="red">Kg</span>.<span class="red">loadScript</span>("test.js", {"name":"kugou"}, func);

<span class="red">Kg</span>.<span class="red">loadScript</span>("test.js", "name=kugou&id=123", func);
</pre>
    </div>
  </div>

  <div class="plugs">
	<h2>焦点图</h2>
	<table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>focId</strong> (String | Object)</td>
            <td>焦点图父层的id或者Dom对象 </td>
		</tr>
		<tr>
			<td width="250"><strong>focTag</strong> (String)</td>
            <td>需切换显示的元素 </td>
		</tr>
		<tr>
			<td width="250"><strong>ctrId</strong> (String | Object)</td>
            <td>控制器父层的id或者Dom对象 -- 可选 </td>
		</tr>
		<tr>
			<td width="250"><strong>ctrTag</strong> (String)</td>
            <td>控制器元素 -- 可选</td>
        </tr>
		<tr>
			<td width="250"><strong>opiton</strong> (Object)</td>
            <td>参数集合（详细看下表格） -- 可选</td>
        </tr>
    </table>
	<table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">option选项</th>
        </tr>
    	<tr>
        	<td width="250"><strong>event</strong> (String)</td>
            <td>切换事件 （click | mouseover）</td>
		</tr>
		<tr>
			<td width="250"><strong>effect</strong> (String)</td>
            <td>切换模式 （fade | scroll）</td>
		</tr>
		<tr>
			<td width="250"><strong>scrollDir</strong> (String)</td>
            <td>滚动方向 （Left | Top）</td>
		</tr>
		<tr>
			<td width="250"><strong>scrollSpeed</strong> (Number)</td>
            <td>滚动速度</td>
        </tr>
		<tr>
			<td width="250"><strong>scrollMode</strong> (Number)</td>
            <td>滚动模式，1代表滚动到尽头后往后切回，2代表无缝滚动</td>
        </tr>
		<tr>
			<td width="250"><strong>timeout</strong> (Number)</td>
            <td>切换时间</td>
        </tr>
		<tr>
			<td width="250"><strong>index</strong> (String | Number)</td>
            <td>启始位置 (输入"random"为随机位置)</td>
        </tr>
		<tr>
			<td width="250"><strong>callback</strong> (Function)</td>
            <td>回调函数</td>
        </tr>
    </table>
	<h3>Example</h3>
  	<iframe style="height:1350px" frameborder="0" src="about:blank" _src="focus.html"></iframe>
  </div>
  
  <div class="plugs">
	<h2>评分</h2>
	<table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>id1</strong> (String | Object)</td>
            <td>评分栏的ID或者DOM对象 </td>
		</tr>
		<tr>
			<td width="250"><strong>id2</strong> (String | Object)</td>
            <td>显示评分结果的id或者Dom对象  </td>
		</tr>
    </table>
	<h3>Example</h3>
  	<iframe style="height:200px" frameborder="0" src="about:blank" _src="grade.html"></iframe>
  </div>
  
  <div class="plugs">
	<h2>滚动</h2>
	<table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>id1</strong> (String | Object)</td>
            <td>滚动层的id或者Dom对象  </td>
		</tr>
		<tr>
			<td width="250"><strong>id2</strong> (String | Object)</td>
            <td>克隆层的id或者Dom对象 </td>
		</tr>
		<tr>
			<td width="250"><strong>opiton</strong> (Object)</td>
            <td>参数集合（详细看下表格） -- 可选</td>
        </tr>
    </table>
	<table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">option选项</th>
        </tr>
    	<tr>
        	<td width="250"><strong>hand</strong> (Boolean)</td>
            <td>手动控制滚动 -- 需配合stopSize和pause一起使用</td>
		</tr>
		<tr>
			<td width="250"><strong>dir</strong> (String)</td>
            <td>滚动方向 （Up | Down | Left | Right）</td>
		</tr>
		<tr>
			<td width="250"><strong>pause</strong> (Boolean)</td>
            <td>停止</td>
		</tr>
		<tr>
			<td width="250"><strong>timeout</strong> (Number)</td>
            <td>停止时间</td>
        </tr>
		<tr>
			<td width="250"><strong>speed</strong> (Number)</td>
            <td>滚动速度</td>
        </tr>
		<tr>
			<td width="250"><strong>stopMoving</strong> (Bollean)</td>
            <td>鼠标悬停在滚动层上是否停住滚动</td>
        </tr>
		<tr>
			<td width="250"><strong>stopSize</strong> (Number)</td>
            <td>停止滚动间隔</td>
        </tr>
		<tr>
			<td width="250"><strong>step</strong> (Number)</td>
            <td>滚动步长值</td>
        </tr>
		<tr>
			<td width="250"><strong>callback</strong> (Function)</td>
            <td>回调函数</td>
        </tr>
    </table>
	<h3>Example</h3>
  	<iframe frameborder="0" src="about:blank" _src="scroll.html"></iframe>
  </div>
  
  <div class="plugs">
	<h2>选项卡</h2>
	<table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>tabId</strong> (String | Object)</td>
            <td>TAB父层的id或者Dom对象   </td>
		</tr>
		<tr>
			<td width="250"><strong>tabTag</strong> (String)</td>
            <td>绑定鼠标行为的tab </td>
		</tr>
		<tr>
        	<td width="250"><strong>contentId</strong> (String | Object)</td>
            <td>TAB CONTENT父层的id或者Dom对象  </td>
		</tr>
		<tr>
			<td width="250"><strong>contentTag</strong> (String)</td>
            <td>被切换的TAB CONTENT  </td>
		</tr>
		<tr>
			<td width="250"><strong>opiton</strong> (Object)</td>
            <td>参数集合（详细看下表格） -- 可选</td>
        </tr>
    </table>
	<table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">option选项</th>
        </tr>
    	<tr>
        	<td width="250"><strong>event</strong> (String)</td>
            <td>切换事件 （click | mouseover）</td>
		</tr>
		<tr>
			<td width="250"><strong>effect</strong> (String)</td>
            <td>切换特效 （null | "fade"）</td>
		</tr>
		<tr>
			<td width="250"><strong>fadeStep</strong> (Number)</td>
            <td>渐现步长值 -- 配合切换特效一起用</td>
		</tr>
		<tr>
			<td width="250"><strong>loop</strong> (String)</td>
            <td>点击是否循环</td>
        </tr>
		<tr>
			<td width="250"><strong>index</strong> (String | Number)</td>
            <td>启始位置 (输入"random"为随机位置)</td>
        </tr>
		<tr>
			<td width="250"><strong>autoPlay</strong> (Boolean)</td>
            <td>是否自动切换选项卡</td>
        </tr>
		<tr>
			<td width="250"><strong>timeout</strong> (Number)</td>
            <td>切换停留时间</td>
		</tr>
		<tr>
			<td width="250"><strong>callback</strong> (Function)</td>
            <td>回调函数</td>
        </tr>
    </table>
	<h3>Example</h3>
  	<iframe style="height:800px" frameborder="0" src="about:blank" _src="tab.html"></iframe>
  </div>
  
  <div class="plugs">
	<h2>提示</h2>
	<table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>id1</strong> (Dom | DomCellection)</td>
            <td>需要显示TIPS的对象 </td>
		</tr>
    </table>
	<h3>Example</h3>
  	<iframe style="height:300px" frameborder="0" src="about:blank" _src="tips.html"></iframe>
  </div>

  <div class="plugs">
	<h2>模拟选择框</h2>
	<table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>touchId</strong> (String | Object)</td>
            <td>触发弹出层对象 </td>
		</tr>
		<tr>
			<td width="250"><strong>selectId</strong> (String | Object)</td>
            <td>弹出层对象 </td>
		</tr>
		<tr>
        	<td width="250"><strong>selectTag</strong> (String)</td>
            <td>弹出层列表标签</td>
		</tr>
		<tr>
			<td width="250"><strong>setInId</strong> (String | Object)</td>
            <td>返回值输入对象 </td>
		</tr>
		<tr>
			<td width="250"><strong>opiton</strong> (Object)</td>
            <td>参数集合（详细看下表格） -- 可选</td>
        </tr>
    </table>
	<table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">option选项</th>
        </tr>
    	<tr>
        	<td width="250"><strong>writeInfo</strong> (String)</td>
            <td>触发输入值事件 （click | mouseover）</td>
		</tr>
		<tr>
			<td width="250"><strong>onkeypress</strong> (Function)</td>
            <td>输入值时触发的函数</td>
		</tr>
		<tr>
			<td width="250"><strong>callback</strong> (Function)</td>
            <td>回调函数</td>
        </tr>
    </table>
	<h3>Example</h3>
  	<iframe style="height:600px" frameborder="0" src="about:blank" _src="select.html"></iframe>
  </div>

  <div class="plugs">
	<h2>滑动</h2>
	<table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>id</strong> (String | Object)</td>
            <td>父层ID </td>
		</tr>
		<tr>
			<td width="250"><strong>tag</strong> (String)</td>
            <td>活动的对象标签名 </td>
		</tr>
		<tr>
        	<td width="250"><strong>ctrL</strong> (String | Object)</td>
            <td>控制左键</td>
		</tr>
		<tr>
			<td width="250"><strong>ctrR</strong> (String | Object)</td>
            <td>控制右键 </td>
		</tr>
		<tr>
			<td width="250"><strong>opiton</strong> (Object)</td>
            <td>参数集合（详细看下表格） -- 可选</td>
        </tr>
    </table>
	<table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">option选项</th>
        </tr>
    	<tr>
        	<td width="250"><strong>event</strong> (String)</td>
            <td>事件触发 （click | mouseover）</td>
		</tr>
		<tr>
			<td width="250"><strong>count</strong> (Number)</td>
            <td>滚动元素的个数</td>
		</tr>

		<tr>
			<td width="250"><strong>fadeIn</strong> (Boolean)</td>
            <td>渐出效果</td>
		</tr>
		<tr>
			<td width="250"><strong>dir</strong> (String)</td>
            <td>滚动方向 （Left | Top）</td>
		</tr>
		<tr>
			<td width="250"><strong>loop</strong> (Boolean)</td>
            <td>是否循环滚动</td>
		</tr>
		<tr>
			<td width="250"><strong>index</strong> (String | Number)</td>
            <td>启始位置 (输入"random"为随机位置)</td>
        </tr>
		<tr>
			<td width="250"><strong>speed</strong> (Number)</td>
            <td>滑动速度</td>
		</tr>
		<tr>
			<td width="250"><strong>callback</strong> (Function)</td>
            <td>回调函数</td>
        </tr>
    </table>
	<h3>Example</h3>
  	<iframe style="height:800px" frameborder="0" src="about:blank" _src="slide.html"></iframe>
  </div>

  <div class="plugs">
	<h2>弹出层</h2>
	<table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">可传入参数</th>
        </tr>
    	<tr>
        	<td width="250"><strong>boxId</strong> (String | Object)</td>
            <td>弹出层的id或者Dom对象 </td>
		</tr>
		<tr>
			<td width="250"><strong>opiton</strong> (Object)</td>
            <td>参数集合（详细看下表格） -- 可选</td>
        </tr>
    </table>
	<table class="param" cellpadding="0" cellspacing="0">
    	<tr>
        	<th colspan="2">option选项</th>
        </tr>
    	<tr>
        	<td width="250"><strong>modal</strong> (Bollean)</td>
            <td>是否打开黑幕层</td>
		</tr>
		<tr>
			<td width="250"><strong>modalcolor</strong> (String)</td>
            <td>黑幕层颜色</td>
		</tr>

		<tr>
			<td width="250"><strong>modalOpa</strong> (Number)</td>
            <td>黑幕层透明度</td>
		</tr>
		<tr>
			<td width="250"><strong>pos</strong> (String)</td>
            <td>弹出层出现的位置 （top | center | bottom）</td>
		</tr>

		<tr>
			<td width="250"><strong>effect</strong> (String)</td>
            <td>显示效果 （normal | fade | slide）</td>
		</tr>
		<tr>
			<td width="250"><strong>callback</strong> (Function)</td>
            <td>回调函数</td>
        </tr>
    </table>
	<h3>Example</h3>
  	<iframe style="height:600px" frameborder="0" src="about:blank" _src="lightbox.html"></iframe>
  </div>
</div>
</body>
</html>
